package com.game;

import android.graphics.Bitmap;
import android.graphics.Canvas;

public class SlideBarVolume extends SlideBar 
{
	private Bitmap m_Step;

	public SlideBarVolume(int x, int y, Bitmap bg, Bitmap step)
	{
		super(x,y,bg.getWidth(), bg.getHeight(),bg);
		
		m_Step = step;
		
		m_CurDis = (m_X + m_W)/2; // Set volume at half by default
	}
	
	@Override
	public void Draw(Canvas canvas) 
	{
		canvas.drawBitmap(m_Background, m_X, m_Y, null);
		
		for(int i = m_X; i <= m_CurDis; i += m_Step.getWidth())
		{
			canvas.drawBitmap(m_Step, i, m_Y, null);
		}

	}

}
